package org.csu.onlineedubackend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * Course comment entity representing a user comment on a course
 * 字段映射与数据库表结构完全匹配
 */
@Data
@TableName("course_comment")
public class CourseComment {
    
    @TableId(type = IdType.AUTO)
    private Integer id;
    
    @TableField("course_id")
    private Integer courseId;
    
    @TableField("student_id")
    private Integer studentId;
    
    private String content;
    
    @TableField("stars")
    private Integer stars;
    
    @TableField("like_count")
    private Integer likeCount;
    
    @TableField("created_at")
    private LocalDateTime createdAt;
    
    @TableField(exist = false)
    private LocalDateTime updatedAt;
    
    private Integer status;
    
    @TableField("username")
    private String username;
    
    @TableField("user_avatar")
    private String userAvatar;
}